#ifndef _GEN_MAINMENU_H_
#define _GEN_MAINMENU_H_

#include "gameflow/ui_state.h"

#ifndef _PLATFORM_WIN32
//#include <thread>
#endif

class MATUIHelper;


class MATMainMenu : public gameflow::UIState 
{
public:
	
	MATMainMenu(camera::FbCamera*	pCamera);
	virtual ~MATMainMenu();

	virtual	bool		OnEnter();
	virtual	bool		OnExit();

	/// update the game
	virtual	bool		Tick(float dt);
	static void			LoadSoundStatic();
	virtual void		KeyPressed(input::Keyboard::KEY* pKey);		
	

protected:

	void DELEGATE_CALL	OnButtonSettings(ui::UIWidget::WIDGET_EVENT Event, ui::UIWidget* pWidget);
	void DELEGATE_CALL	OnHardQuit(ui::UIWidget::WIDGET_EVENT Event, ui::UIWidget* pWidget);

	void DELEGATE_CALL	OnButtonRateUS(ui::UIWidget::WIDGET_EVENT Event, ui::UIWidget* pWidget);
	void DELEGATE_CALL	OnButtonMoreGames(ui::UIWidget::WIDGET_EVENT Event, ui::UIWidget* pWidget);

	//void DELEGATE_CALL	OnButtonGotoFacebook(ui::UIWidget::WIDGET_EVENT Event, ui::UIWidget* pWidget);
	//void DELEGATE_CALL	OnButtonGotoTwitter(ui::UIWidget::WIDGET_EVENT Event, ui::UIWidget* pWidget);
	//void DELEGATE_CALL	OnButtonGoto2DStar(ui::UIWidget::WIDGET_EVENT Event, ui::UIWidget* pWidget);
	void DELEGATE_CALL	OnButtonGotoMap(ui::UIWidget::WIDGET_EVENT Event, ui::UIWidget* pWidget);

	ui::UIWidget*		m_pUIChar;
	ui::UIWidget*		m_pUILogo;
	ui::UIWidget*		m_pUIButtonsFrame;

	//ui::UIWidget*		m_pUIFacebook;
	//ui::UIWidget*		m_pUITwitter;
	//ui::UIWidget*		m_pUI2DStar;

	std::vector<MATUIHelper*>		m_pButtons;	
	bool				m_IsFinishAddingMapState;
	bool				m_IsLoadedSound;
	bool				m_IsLoadedEffect;

#ifndef _PLATFORM_WIN32
	//static std::thread	m_Thread;
#endif
};


#endif //_GEN_PUZZLE_STATE_H_
